package com.andrew.pegSolitareEngine;

import android.app.Activity;
import android.os.Bundle;
import android.text.Layout;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.Toast;

public class AndroidPegSolitare extends Activity {
	private GameController gameController;
	/** Called when the activity is first created. */

	private Button createBoard;
	private LinearLayout boardLayout;

	/*
	 * this is for the setup of the game and contains any options for the player
	 * to setup the game. When the start button is pressed, the board is
	 * created.
	 */
	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.main);
		
		boardLayout = (LinearLayout) findViewById(R.id.boardLayout);
		createBoard = (Button) findViewById(R.id.createBoard);
		gameController = new GameController(boardLayout, getApplicationContext());
		
		createBoard.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				gameController.startGame();				
			}
		});
	}
}